<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />  
<meta name="viewport" content="width=device-width" />  
<title></title>
</head>
<body style="margin: 0;">  
<div id="content" >
	<!-- <OBJECT classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" id="vlc"  	
		   width="380" height="195" id="vlc" events="True">  
	 <param name="MRL" value="" />  
	 <param name="Src" value="" />  
	   <param name="ShowDisplay" value="True" />  
	 <param name="AutoLoop" value="False" />  
	 <param name="AutoPlay" value="False" />  
	 <param name="Time" value="True"/>  
	 </OBJECT> -->
	 <object id="vlc" class="vlc" type='application/x-vlc-plugin'  events='True' width="380" height="195" codebase="http://get.videolan.org/vlc/2.2.5.1/win32/vlc-2.2.5.1-win32.exe">
        <param name='mrl' value='' />
        <param name='volume' value='50' />
        <param name='autoplay' value='true' />
        <param name='loop' value='false' />
        <!-- <param name='fullscreen' value='false' /> -->
		<embed type="application/x-vlc-plugin" pluginspage="http://get.videolan.org/vlc/2.2.5.1/win32/vlc-2.2.5.1-win32.exe" />  
   </object>
</div>
</body>
<script type="text/javascript" src="../../vendor/jquery/jquery-1.11.2.js"></script>
<script>
	var rtspURL=GetURL();
	
	var vlc = document.getElementById("vlc");    
	//alert(parent.document.getElementById("vlc1").height);
	//alert($("#vlc1",parent.document.body).width());
	var WIDTH = $("#vlc1",parent.document.body).width();
	var HEIGHT = $("#vlc1",parent.document.body).height();
	$(vlc).attr("width",WIDTH);
	$(vlc).attr("height",HEIGHT);
	var itemId= vlc.playlist.add(rtspURL);  // 播放列表中播放节目的id
	vlc.playlist.playItem(itemId);
	// var vlc = document.getElementById("vlc");    
	// var streama="rtsp://admin:admin@172.18.3.250:554/cam/realmonitor?channel=1&subtype=1";
	// var itemId= vlc.playlist.add(streama);  // 播放列表中播放节目的id
	// vlc.playlist.playItem(itemId);
	
	
	// function GetQueryString(name)
	// {
		 // var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
		 // var r = location.search.substr(1).match(reg);
		 // if(r!=null)return  unescape(r[2]); return null;
	// }
	// function GetURLString()
	// {
		 // var reg = new RegExp("(^|&)url=(.*)(&|$)");
		 // var r = location.search.substr(1).match(reg);
		 // if(r!=null)return  unescape(r[2]); return null;
	// }
	function GetURL()
	{
		 var reg = new RegExp("^url=(.*)$");
		 var r = location.search.substr(1).match(reg);
		 if(r!=null)return  unescape(r[1]); return null;
	}
</script>  
</html>  